import Entity.Manager;
import Entity.Programmer;
import Entity.Stu;
import Entity.Teacher;

/**
 * @author chenjian
 * @version 1.0
 * @date 2025/3/20 15:44
 * @description
 */
public class Test {
    //程序员和经理的父类继承
   /* public static void main1(String[] args) {
        //程序员打印
        Programmer pros = new Programmer("达达利亚", 02, 30000);
        pros.work();

        Manager managers = new Manager("基尼奇", 1, 32000, 3000);
        managers.work();
    }*/

    //学生和老师的父类继承
    public static void main2(String[] args) {
        Stu stus = new Stu("张三", 13);
        stus.learn();

        Teacher teachers = new Teacher("张老师", 33);
        teachers.teach();
    }

    public static void main(String[] args) {

        //由于父类是个抽象类，所以通过对子类进行实例化进行赋值

       // 定义一个具体的子类，继承抽象类，并且实现抽象类中的所有抽象方法，之后实例化这个子类，再将子类对象赋值给抽象类类型的变量，也就是运用多态的特性
        Manager manager = new Manager();

        //员工
        Manager pro1 = new Manager("员工1", 1, 4500, 0);
        Manager pro2 = new Manager("员工2", 2, 5000, 0);
        Manager pro3 = new Manager("员工3", 3, 4000, 0);
        Manager pro4 = new Manager("员工4", 4, 4300, 0);
        Manager pro5 = new Manager("员工5", 5, 5100, 0);
        //经理
        Manager pro6 = new Manager("经理1", 6, 6100, 3000);
        Manager pro7 = new Manager("经理2", 7, 6200, 3200);

        /*Programmer pro1 = new Programmer("员工1", 1, 4500);
        Programmer pro2 = new Programmer("员工2", 2, 5000);
        Programmer pro3 = new Programmer("员工3", 3, 4000);
        Programmer pro4 = new Programmer("员工4", 4, 4300);
        Programmer pro5 = new Programmer("员工5", 5, 5100);*/


        /*for (int i = 0; i < pros.length; i++) {
            Programmer pro = new Programmer();
            System.out.println(pro.getName() + "\t" + pro.getId() + "\t" + pro.getSalary() + "\t" + pro.finasalary());
        }*/

        pro1.work();
        pro2.work();
        pro3.work();
        pro4.work();
        pro5.work();
        pro6.work();
        pro7.work();


    }
}
